import { defineStore } from 'pinia';
import { getBatchList } from '@/Api/pc';

const useBatchStore = defineStore('batch', {
  state() {
    return {
      systemName: '',
      batchList: [],
    };
  },

  actions: {
    async getBatchListAjax(store, payload) {
      await getBatchList().then((res) => {
        this.batchList = res.obj;
      });
    },
    changeName(name) {
      this.systemName = name;
    },
  },
});

export default useBatchStore;
